﻿using System;
using UnityEngine;
using UnityEngine.EventSystems;
namespace HBFramework
{
    /// <summary>
    /// Pointer进出观察
    /// </summary>
    [DisallowMultipleComponent]
    public class PointerEEObserver : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
    {
        public event Action<PointerEventData> OnPointerEnterAct;
        public event Action<PointerEventData> OnPointerExitAct;
        public void OnPointerEnter(PointerEventData eventData)
        {
            OnPointerEnterAct?.Invoke(eventData);
        }

        public void OnPointerExit(PointerEventData eventData)
        {
            OnPointerExitAct?.Invoke(eventData);
        }
    }
}
